Release 10.1A: OpenEdge Development:
Open Client Introduction and Programming
Remote 4GL methods
ProxyGen maps each 4GL non-persistent procedure, internal procedure, and user-defined function that you expose on the AppServer, to a remote 4GL method. When invoked, each remote 4GL method executes the procedure (or user-defined function) on the AppServer, passes any parameter values, and makes any return values available to the Open Client.
Note: If the 4GL persistent procedure has a super procedure, the proxy also contains remote 4GL methods for the super procedure, as long as the remote procedure declares the super procedure prototypes. For more information, see the information on programming for Open Client applications in OpenEdge Application Server: Developing AppServer Applications .Identifying generated methods
ProxyGen generates method names using automatic conversions and conventions. For more information, see Chapter 3, " Generating Proxies and Web Service Definitions." In addition, you can customize the method names in ProxyGen. Thus, each method name might not match the name of the corresponding 4GL procedure or function. As a reference for method names in your proxy, use the generated Java source files for Java clients, the generated assembly for .NET clients, and the WSDL for Web services.
Passing parameters
ProxyGen maps 4GL data types to equivalent data types in the Open Client for 4GL
INPUT,OUTPUT, andINPUT-OUTPUTparameters. For more information on data type mapping for your type of Open Client, see OpenEdge Development: Java Open Clients , OpenEdge Development: .NET Open Clients , and OpenEdge Development: Web Services .Handling return values
For any remote 4GL procedure, the corresponding proxy method can be customized to return the 4GL
RETURN-VALUE; otherwise, the method returns void. Alternatively, after calling the method, the client can access the current value of the 4GLRETURN-VALUEfunction by calling the following common method for Java and .NET Open Clients:
This method returns the current value of
RETURN-VALUEas set by theRETURNstatement most recently executed on the AppServer for this connection. It returns a string, which can be null, so the client should check for a 4GL unknown value(?). AppObjects, SubAppObjects, and ProcObjects all support this method.The
RETURN-VALUEfunction is set in the 4GL using theRETURN stringor theRETURN ERRORstringstatement. For more information on these statements, see OpenEdge Development: Progress 4GL Reference , and for how they function in an AppServer application, see OpenEdge Application Server: Developing AppServer Applications .For any remote user-defined function, ProxyGen defines the corresponding method to return a value that is compatible with the 4GL data type returned by the user-defined function.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |